package com.tsingtao.springcloudproject2.controller;

import com.tsingtao.springcloudproject2.entity.Project2;
import com.tsingtao.springcloudproject2.service.TestSeataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/seata")
public class TestSeataController {

    @Autowired
    private TestSeataService testSeataService;

    @PostMapping("/insert")
    public int insert(@RequestBody Project2 project2) {
        return testSeataService.insert(project2);
    }

}
